<template>
    <div style="width: 100%;height: 100%;position: relative">
        <Spin size="large" fix v-if="Loading"></Spin>
        <Form :label-width="180" ref="formValidate" :model="formValidate" id="form"
              :rules="ruleValidate">
            <Card>
                <p slot="title">
                    <Icon type="ios-man"></Icon>
                    救助信息
                </p>
                <table>
                    <tr>
                        <td colspan="2">
                            <Form-item label="家庭人员信息:">
                                <span style="padding-right: 20px">{{memberInformation}}</span>
                                <font v-if="information.includes('不符合') || information.includes('非保障户')" color="red"
                                      style="font-size: 16px">{{information}}</font>
                                <font v-else color="green" style="font-size: 16px">{{information}}</font>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <Form-item label="家庭月基础收入金额:" prop="ssca0044">
                                <Input v-model="formValidate.ssca0044" placeholder="请输入家庭月基础收入金额" :disabled="disabled"/>
                            </Form-item>
                        </td>
                        <td>
                            <Form-item label="家庭月赡抚养费金额:" prop="ssca0045">
                                <Input v-model="formValidate.ssca0045" placeholder="请输入家庭月赡抚养费金额" :disabled="disabled"/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 50%">
                            <Form-item label="家庭月财产收入金额:" prop="ssca0046">
                                <Input v-model="formValidate.ssca0046" placeholder="请输入家庭月财产收入金额" :disabled="disabled"/>
                            </Form-item>
                        </td>
                        <td>
                            <Form-item label="家庭月基础支出金额:" prop="ssca0047">
                                <Input v-model="formValidate.ssca0047" placeholder="请输入家庭月基础支出金额" :disabled="disabled"/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <Form-item label="核减金额:" prop="ssca0113">
                                <Input v-model="formValidate.ssca0113" placeholder="请输入核减金额" :disabled="disabled"/>
                            </Form-item>
                        </td>
                        <td style="width: 50%">
                            <Form-item label="家庭月总收入金额(核减并扣除家庭支出):" prop="ssca0049">
                                <Input v-model="formValidate.ssca0049" placeholder="请输入家庭月总收入金额" :disabled="disabled"/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>

                        <td>
                            <Form-item label="家庭人口数:" prop="ssca0051">
                                <Input v-model="formValidate.ssca0051" placeholder="请输入家庭人口数" :disabled="disabled"/>
                            </Form-item>
                        </td>
                        <td>
                            <Form-item label="保障人口数:" prop="ssca0052">
                                <Input v-model="formValidate.ssca0052" placeholder="请输入保障人口数" :disabled="disabled"/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr v-if="formValidate.ssca0002=='100'||formValidate.ssca0002=='200'||formValidate.ssca0002=='102'||formValidate.ssca0002=='202'">
                        <td>
                            <Form-item label="差额保障金额:" prop="ssca0004">
                                <Input v-model="formValidate.ssca0004" placeholder="请输入差额保障金额" :disabled="disabled"/>
                            </Form-item>
                        </td>
                        <td style="width: 50%">
                            <Form-item label="分类救助上浮总金额:" prop="ssca0025">
                                <Input v-model="formValidate.ssca0025" placeholder="请输入分类救助上浮总金额" :disabled="disabled"/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 50%">
                            <Form-item label="保障标准:" prop="ssca0042">
                                <Input v-model="formValidate.ssca0042" placeholder="请输入保障标准" :disabled="disabled"/>
                            </Form-item>
                        </td>
                        <td style="width: 50%">
                            <Form-item label="总保障金额:" prop="ssca0026">
                                <Input v-model="formValidate.ssca0026" placeholder="请输入总保障金额" :disabled="disabled"
                                       :title="text"/>
                            </Form-item>
                        </td>

                    </tr>
                    <tr v-if="formValidate.yjab0012=='03'">
                        <td style="width: 50%">
                            <Form-item label="补差调增调减情况:" prop="ssca0017">
                                <c-dict-select v-model="formValidate.ssca0017" dictCode="changeinsurancereason"
                                               :width="300" :disabled="disabled"/>
                            </Form-item>
                        </td>
                        <td>

                            <Form-item label="补差金额:" prop="ssca0018">
                                <Input v-model="formValidate.ssca0018" placeholder="请输入补差金额" :disabled="disabled"/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <Form-item label="高龄补贴总金额:" prop="ssca0065">
                                <Input v-model="formValidate.ssca0065" placeholder="请输入高龄补贴总金额" :disabled="disabled"/>
                            </Form-item>
                        </td>
                        <td style="width: 50%">
                            <Form-item label="开户银行名称:" prop="ssca0009">
                                <c-dict-select v-model="formValidate.ssca0009" dictCode="bankcategory" disabled
                                               :width="300"/>
                            </Form-item>
                        </td>

                    </tr>
                    <tr>
                        <td>
                            <Form-item label="是否代领:" prop="ssca0082">
                                <Select v-model="formValidate.ssca0082" disabled>
                                    <Option value="1">是</Option>
                                    <Option value="0">否</Option>
                                </Select>
                            </Form-item>
                        </td>
                        <td style="width: 50%">
                            <Form-item label="开户人姓名:" prop="ssca0010">
                                <Input v-model="formValidate.ssca0010" placeholder="请输入开户人姓名" disabled/>
                            </Form-item>
                        </td>

                    </tr>
                    <tr>
                        <td>
                            <Form-item label="开户人证件号码:" prop="ssca0083">
                                <Input v-model="formValidate.ssca0083" placeholder="请输入开户人证件号码" disabled/>
                            </Form-item>
                        </td>
                        <td style="width: 50%">
                            <Form-item label="银行账号:" prop="ssca0011">
                                <Input v-model="formValidate.ssca0011" placeholder="请输入银行账号" disabled/>
                            </Form-item>
                        </td>

                    </tr>
                </table>
            </Card>
            <Card>
                <p slot="title">
                    <Icon type="ios-notifications"/>
                    预警处置信息
                </p>
                <table>
                    <tr>
                        <td style="width: 50%">
                            <Form-item label="预警人员姓名:" prop="yjab0001">
                                <Input v-model="formValidate.yjab0001" disabled/>
                            </Form-item>
                        </td>
                        <td style="width: 50%">
                            <Form-item label="证件号码:" prop="yjab0002">
                                <Input v-model="formValidate.yjab0002" disabled/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <Form-item label="预警类别:" prop="yjab0004">
                                <c-dict-select v-model="formValidate.yjab0004" dictCode="warningcategory"
                                               :width="300" :disabled="disabled"/>
                            </Form-item>
                        </td>
                        <td>
                            <Form-item label="预警时间:" prop="yjab0005">
                                <DatePicker type="date" v-model="formValidate.yjab0005"
                                            class="time" disabled/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <Form-item label="当前处置人员:" prop="yjab0007">
                                <Input v-model="formValidate.yjab0007" disabled/>
                            </Form-item>
                        </td>
                        <td id="area">
                            <Form-item label="行政所属:" prop="yjab0017">
                                <area-linkage :areaCode.sync="formValidate.yjab0017" style="width:450px"
                                              :countyDisable="true"
                                              :streetDisable="true"
                                              :communityDisable="true"/>
                            </Form-item>
                        </td>

                    </tr>
                    <tr>
                        <td>
                            <Form-item label="处置方案:" prop="yjab0012">
                                <c-dict-select v-model="formValidate.yjab0012" dictCode="warning_handle_type"
                                               :width="300" :disabled="disabled"/>
                            </Form-item>
                        </td>
                        <td>
                            <Form-item label="处置时间:" prop="yjab0008">
                                <DatePicker type="date" v-model="formValidate.yjab0008" placeholder="请选择处置时间"
                                            class="time" :editable="false"></DatePicker>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <Form-item :label=label prop="ssca0089">
                                <c-dict-select v-model="formValidate.ssca0089" dictCode="yesorno"
                                               :disabled="disabled0089"
                                               :width="300"/>
                            </Form-item>
                        </td>
                        <td v-if="formValidate.ssca0002!='203'">
                            <Form-item label="是否进行经济核查:" prop="ssca0090">
                                <c-dict-select v-model="formValidate.ssca0090" dictCode="yesorno"
                                               :disabled="disabled0090"
                                               :width="300"/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <Form-item label="处置原因说明:" prop="yjab0009">
                                <c-text-area v-model="formValidate.yjab0009" :max-length="100" :row=3 width="890"
                                             placeholder="请填写处置原因说明"/>
                            </Form-item>
                        </td>
                    </tr>
                </table>
            </Card>
        </Form>
        <div id="buttondiv">
            <Button @click="prevStep"> 上一步</Button>
            <Tooltip placement="top" v-if="otherWarnCount>0">
                <Button type="warning" @click="showOthers" style="margin-left: 10px">关联预警信息查看</Button>
                <div slot="content">
                    <p>预警处置以户为单位，处置当前预警同时会将本户其他未处置预警以当前所选方案一并处理！</p>
                </div>
            </Tooltip>
            <Tooltip placement="top" v-if="formValidate.yjab0012=='03'">
                <Button type="error" @click="printSs00011" style="margin-left: 10px">事前查验结果打印</Button>
                <div slot="content">
                    <p>请打印查验结果后，进行提交预警处置 !</p>
                </div>
            </Tooltip>
            <Button type="primary" @click="nextStep" style="margin-left: 10px" :disabled="submitDisabled">预警处置提交
            </Button>
        </div>
        <ss00011-print-modal ref="printModal" @changeSubmit="changeSubmit"/>
        <other-warn-modal ref="otherWarnModal"></other-warn-modal>
    </div>
</template>

<script>
    import {getAction, postAction} from '@/api/request'
    import {CommonMixin} from '@/views/common/js/CommonMixin'
    import {application12_create} from '../js/application12_create'
    import '@/views/common/css/common.css';
    import Ss00011PrintModal from '../../ss11_create_steps/modules/Ss00011PrintModal'
    import OtherWarnModal from '../modules/otherWarnInfoModal'

    export default {
        name: "application2",
        mixins: [CommonMixin, application12_create],
        components: {Ss00011PrintModal, OtherWarnModal},
        data() {
            return {
                formValidate: {

                },
                bpmStatus: "200",
                otherWarnCount: 0,
                validate18Age: false,
                disabled0090: false,
                disabled0089: false,
                validateMsg: "",
                isValidate: true,
                text: "",
                label:''

            }
        },
        methods: {},
        created() {
            this.Loading = true;
            this.getMemberList();
            // this.getFamilyInfor();
            this.getTab12Infor();
            this.autoChangeSubmit();
        }
    }
</script>

<style scoped src="@/views/common/css/application12.css">

</style>
<style scoped>
    /deep/ .ivu-tooltip-inner {
        max-width: 700px;
    }
</style>
